cmake_minimum_required(VERSION 3.0)
project(usart)
find_package(OpenCV REQUIRED)
find_package(CSerialPort QUIET)

include_directories(${OpenCV_INCLUDE_DIRS})

add_executable(usart main.cpp  ${PROJECT_SOURCE_DIR}/src/usart.cpp)

add_executable(getRGB getRGB.cpp)

add_executable(HSV HSV.cpp  ${PROJECT_SOURCE_DIR}/src/usart.cpp)

include_directories(${CSerialPort_INCLUDE_DIR})
target_link_libraries (${PROJECT_NAME} ${CSerialPort_LIBRARY})
# 链接OpenCV库
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

target_link_libraries (getRGB ${CSerialPort_LIBRARY})

target_link_libraries(HSV ${OpenCV_LIBS})
# 链接OpenCV库
target_link_libraries(getRGB ${OpenCV_LIBS})
include_directories(${PROJECT_SOURCE_DIR}/include/)